package com.bianmaba.example.respoistory;

import com.bianmaba.example.bean.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.QueryHints;

import javax.persistence.QueryHint;
import java.util.List;

public interface UserRespoistory extends JpaRepository<User, String> {
    @QueryHints(forCounting = false, value = {@QueryHint(name = org.hibernate.jpa.QueryHints.HINT_CACHEABLE, value = "true")})
    public List<User> findByName(String name);
}

